﻿namespace pay.sofort.test
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Models;

    [TestClass]
    public class TestNotifyManager : TestBase
    {
        [TestMethod]
        [DeploymentItem(@"example\","example")]
        [DeploymentItem(ConfigFileName)]
        public void TestNotifyConfirm()
        {
            TPaySofortConfig config = TPaySofortConfig.LoadFromFile(ConfigFileName);

            TPaySofortNotifyManager man = new TPaySofortNotifyManager(config);

            string xmlIn = GetXmlTestData("status_notification.xml");
            PaySofortTransaction transaction = man.ProcessPaySofortNotify(xmlIn, "received", "...url...");

            Assert.IsNotNull(transaction);
        }
    }
}
